import request from '@/config/axios'

// 级别变动 VO
export interface LevelRecordVO {
  id: number // ID
  changeTime: Date // 变更时间
}

// 级别变动 API
export const LevelRecordApi = {
  // 查询级别变动分页
  getLevelRecordPage: async (params: any) => {
    return await request.get({ url: `/wo/level-record/page`, params })
  },

  // 查询级别变动详情
  getLevelRecord: async (id: number) => {
    return await request.get({ url: `/wo/level-record/get?id=` + id })
  },

  // 新增级别变动
  createLevelRecord: async (data: LevelRecordVO) => {
    return await request.post({ url: `/wo/level-record/create`, data })
  },

  // 修改级别变动
  updateLevelRecord: async (data: LevelRecordVO) => {
    return await request.put({ url: `/wo/level-record/update`, data })
  },

  // 删除级别变动
  deleteLevelRecord: async (id: number) => {
    return await request.delete({ url: `/wo/level-record/delete?id=` + id })
  },

  // 导出级别变动 Excel
  exportLevelRecord: async (params) => {
    return await request.download({ url: `/wo/level-record/export-excel`, params })
  }
}